<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Goods extends Model
{
    //兑换商品
    protected $table = 'goods';

    public function goods_order(){
        return $this->hasMany(GoodsOrder::class,'goods_id','id');
    }

    public function getGoodsImgAttribute($value)
    {
        return getDomain().'/'.$value;
    }
}

